Passed
Branch master (312c6c)
by Alejandro
02:34
created

server.js ➔ ???   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 3
Bugs 0 Features 0
Metric Value
cc 1
c 3
b 0
f 0
nc 1
nop 1
dl 0
loc 1
ccs 1
cts 1
cp 1
crap 1
rs 10
1
import { createAction, handleActions } from 'redux-actions';
2
import { pipe } from 'ramda';
3
4 1
export const FETCH_SERVERS = 'shlink/servers/FETCH_SERVERS';
5
6 1
export const listServers = ({ listServers }) => createAction(FETCH_SERVERS, () => listServers());
7
8 1
export const createServer = ({ createServer }, listServers) => pipe(createServer, listServers);
9
10 1
export const deleteServer = ({ deleteServer }, listServers) => pipe(deleteServer, listServers);
11
12 1
export const createServers = ({ createServers }, listServers) => pipe(createServers, listServers);
13
14
export default handleActions({
15 1
  [FETCH_SERVERS]: (state, { payload }) => payload,
16
}, {});
17